using UnityEngine; using UnityEngine.SceneManagement; public class RandomSceneLoad : MonoBehaviour { [SerializeField] private float delayBeforeLoading = 20f; private float timeElapsed; // Update is called once per frame private void Update() { //int index = Random.Range(0,1); timeElapsed += Time.deltaTime; if(timeElapsed>delayBeforeLoading) { SceneManager.LoadScene(Random.Range(0,11)); } } }